1a11877ae9098fc80d3a84aec58204fb4435584e,spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/TypeBasedAggregationOperationContextUnitTests.java,TypeBasedAggregationOperationContextUnitTests,rendersAggregationConditionalInTypedAggregationContextCorrectly,#,289

Before Change


		TypedAggregation<FooPerson> agg = newAggregation(FooPerson.class,
				project("name") //
						.and("age") //
						.applyCondition(conditional(Criteria.where("age.value").lt(10), new Age(0), field("age"))) //
		);

		DBObject dbo = agg.toDbObject("person", context);

After Change


				project("name") //
						.and("age") //
						.applyCondition(
								ConditionalOperators.when(Criteria.where("age.value").lt(10)).then(new Age(0)).otherwiseValueOf("age")) //
		);

		DBObject dbo = agg.toDbObject("person", context);